package com.lhs.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhs.entity.blog.blog_label;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
* @author 15977
* @description 针对表【blog_label】的数据库操作Mapper
* @createDate 2025-09-11 09:04:15
* @Entity com.lhs.blog.blog_label
*/
@Mapper
public interface blog_labelMapper extends BaseMapper<blog_label> {

    @Select("INSERT INTO blog_label (postId, label) VALUES (#{postId}, #{label})")
    void saveLabel(blog_label blogLabel);

    @Select("DELETE FROM blog_label WHERE postId = #{postId}")
    void removeById(Long postId);

    @Select("SELECT label FROM blog_label WHERE postId = #{postId}")
    String getLabelByPostId(Long postId);
}




